    <div ng-controller="Supplier_DeliveryListsC">
        <div class="bg-light lter b-b wrapper-md">
            <h1 class="m-n font-thin h3">出库单列表</h1>
        </div>
        <div class="wrapper-md" style="text-align: right;">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <button type="button" class="btn btn-default" ng-click="goorderList()">返回</button>
                </div>
                <div class="table-responsive text-center" >
                    <table id="example1" class="table table-striped b-t b-light">
                        <thead>
                        <tr>
                            <th style="text-align: center;">创建人</th>
                            <th style="text-align: center;">出库时间</th>
                            <th style="text-align: center;">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="item in pageData.Data">
                            <td style="width: 33%">{{item.Creater.Name}}</td>
                            <td style="width: 33%">{{item.CreateTime}}</td>
                            <td style="width: 34%">
                                <button class="btn btn-sm btn-default" ng-click="goorderDetail(item.Id)">
                                    <i class="fa fa-plus text"></i>
                                    <span class="text">详情</span>
                                </button>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="panel-heading" ng-include="'/htm/tpl/Supplier/Paging.html'">
                    </div>
                </div>
            </div>
        </div>
    </div>
<script>
    
    var nnum = 0;
    angular.module('app')//非标优惠
        .controller("Supplier_DeliveryListsC", function ($scope, $state, $http, $stateParams) {
            $scope.id = $stateParams.id;
            $scope.pageData = {};
            $scope.pageData.Page = 1;
            if($stateParams.num == 0){
                $scope.myurl2 = 'app.TraderManage_List';
                nnum = 0;
            } else if ($stateParams.num == 1) {
                $scope.myurl2 = 'app.Warehouse_List';
                nnum = 1;
            }else {
                $scope.myurl2 = 'app.Provider_List';
                nnum = 2;
            }
            $scope.pageData.Rows = $scope.defPageRows;
            $scope.getData = function (p, r) {
                if (p) {
                    p = p < 1 ? 1 : p;
                } else p = 1;
                if (r) {
                } else r = $scope.defPageRows;
                $http({
                        url: "../api/Provider/GetDeliveryLists?providerId=" + $scope.id + "&page=" + p + "&rows=" + r,
                        method: "GET"
                    })
                    .then(function (res) {
                        $scope.pageData = res.data;
                        console.log($scope.pageData.Data);
                    })
                    .then(function (error) {
                        if (error) {
                            alert("数据获取失败");
                        }
                    });
            };
            $scope.getData(1, $scope.pageData.Rows);
            //返回仓库列表
            $scope.goorderList = function () {
                $state.go($scope.myurl2, { num: $stateParams.num });
            };

            $scope.goorderDetail = function (detailid) {
                $state.go('app.Depot_MoreDeliveryLists', { id: detailid, num: nnum });
            };
        })

</script>
